<?php

namespace App\Models\SubAccount;

use App\Models\Business\PlatformType;
use App\Models\Business\RecordDataColumn;
use App\Models\Business\ShopProfileTemplate;
use App\Models\ShopManager;
use App\Models\SystemUser;
use Illuminate\Database\Eloquent\Model;
use App\Models\ShopDetail;

class SubAccountDataRecord extends Model
{
    protected $guarded=[];

    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format('Y/m/d H:i:s');
    }

    //
    public function account(){
        return $this->belongsTo(SubAccount::class,'sub_account_id');
    }
    //
    public function shop(){
        return $this->belongsTo(ShopDetail::class,'shop_id','id');
    }
    //
    public function recordStaff(){
        return $this->belongsTo(SystemUser::class,'record_staff_id','id');
    }
    //
    public function template(){
        return $this->belongsTo(RecordDataColumn::class,'template_id','id');
    }
    //
    public function platform(){
        return $this->belongsTo(PlatformType::class,'platform_id');
    }


}
